package com.wans.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

//@FeignClient(value = "weather",url = "https://cn.apihz.cn")
@FeignClient(value = "weather", url = "http://t.weather.sojson.com")
public interface WeatherFeignClient {

    @GetMapping("/api/tianqi/tqyb.php")
    String getWeather(
            @RequestParam(value = "id") String id,
            @RequestParam(value = "key") String key,
            @RequestParam(value = "sheng") String sheng,
            @RequestParam(value = "place") String place
    );

    @GetMapping("/api/weather/city/{cityId}")
    String getWeather2(@PathVariable String cityId);
}
